Page({

  /**
   * 页面的初始数据
   */
  data: {
      imgUrls: [
        '/image/user1.jpg',
        '/image/user2.jpg',
        '/image/user3.jpg',
        '/image/user4.jpg'
      ],
      indicatorDots: true,  //是否显示面板指示点
      autoplay: true,      //是否自动切换
      interval: 3000,       //自动切换时间间隔
      duration: 1000,       //滑动动画时长
      inputShowed: false,
      inputVal: "",

    onLoad: function (options) {
      wx.request({
        url: 'http://api.tianapi.com/healthtip/index',
        header: {'content-type':'text/plain;charset=utf-8'},
        success: (data) =>{
          console.log("成功")
          this.setData({
            content:data.data.newslist,
          })
        }
      })
   
    },
menuitems: [
  { text: '健康测评', url: '/pages/page2/physical/physical', icon: '/image/user/user1.png', tips: '', arrows: '/image/user/arrows.png' },
  { text: '体温测量', url: '/pages/page2/texting/texting', icon: '/image/user/user2.png', tips: '', arrows: '/image/user/arrows.png' },
  { text: '天气状况', url: '/pages/page2/weather/weather', icon: '/image/user/user3.png', tips: '', arrows: '/image/user/arrows.png' },
  { text: '帮助说明', url: '/pages/page2/inside/inside', icon: '/image/user/user4.png', tips: '', arrows: '/image/user/arrows.png' }
]
  },

  onShareAppMessage: function () {
 
    let url = encodeURIComponent('/packageNews/pages/news_detail/news_detail?news_id=' + this.data.news_id);
 
    return {
      title: "详情",
      path:`/pages/page1/index/index?url=${url}` 
    }
 
  },
})